package com.rzj.book.controller;

import com.alibaba.fastjson.JSON;
import com.rzj.book.en.Menu;
import com.rzj.book.service.IMenuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @ClassName MenuController
 * @Description TODO
 * @Author Administrator
 * @Date 2020/5/17 15:34
 * @Version 1.0
 */
@RestController
@RequestMapping("/menu")
public class MenuController extends BaseController {

    @Autowired
    private IMenuService menuService;

    @RequestMapping("/getMenuListByEmpId")
    public String getMenuListByEmpId(Integer empId){
        List<Menu> menuListByEmpId = menuService.findMenuListByEmpId(empId);
        write(JSON.toJSONString(menuListByEmpId));
        return null;
    }

}
